paradiseislandhdfandomcom-20200214-history
User talk:Tdt30
Welcome Hi, welcome to Paradise island hd Wiki! Thanks for your edit to the Atrium Hotel page. Please leave a message on my talk page if I can help with anything! -- CMONYALL (Talk) 22:18, April 5, 2012 Templates Hi Tdt30, Further to our conversation on Spreadsheets: Wow, someone who wants to put more work into this than I am, I thought I was the only one that crazy here :) I think something like that would be very usefull, I hope you are willing to share the results. Good luck {C}Tdt30 18:45, June 12, 2012 (UTC) I have changed paths from trying to format individual excel cells into a word doc with wikitext formatting. In part, it got a bit tedious, in part, I learnt much more about wikitext and templates and parsers and spent a couple of nights working on templates where we could just enter a half-dozen cells into an Infobox which would spit out the whole page complete. Then I discovered PHP and a basic excel2wikitext script. I copied that script and made it a little more flexible. It's a work in progress, and you can see different formatting on different Independence Day pages, but for the moment what I have is: http://ithost.com.au/xl2wiki You copy and paste an excel block of cells (array) such as a modified version of the one you gave me (I will set up a Google Docs account to share my mods back with you), and depending on what type of table you're working with, it could have a row of hearders, column of headers (eg: Infobox) or both or neither. (Note: ensure no trailing carriage-returns are on the end). To make it possible to add in a dozen stats boxes, such as your Cabin ones, I made it so you can use a template to call the top-headers so you just type in what table you're creating, and it will pull in the formatting. So far I just made the one template (you've only given me the one spreadhseet formulas). eg: Template:StatsTableHeader. Because I've started putting an image into the stats table corner, you can give the template an image filename, such as Event_independence.png eg: (if no parameter is passed, it uses Event_blank.png by default. So, then you just copy and paste the result straight into the wiki edit (source) page. Before I created the StatsTableHeader template, I just copied and pasted the Table formatting and Hearder Rows onto the new pages, then copied and pasted from my PHP result everything except the top line. So you can do the same with other tables wthout/before creating additional templates. As it is, it's just a short way from being able to copy&paste a half-dozen cells from map1_building.plist into excel/googledocs, setting the $/€ flag, copy&paste the block into xl2wiki, enter a table template name, copy&paste that result into a page, and it's about 30 seconds work from beginning to end to add a whole table of your choosing! Obviously we want structure pages to be consistant, and this will help with that. eg: If down the track it's decided to change something, we should be able to change it on one template and have that change reflect across all pages. # My next step is to look into PHP equations, and try to bypass excel, so less copy&pasting. So instead of enterring the half-dozen cells into excel, we enter them into the PHP page. # Then to create a PHP page to create the top Infobox and image from that data. # Then to make an all-in-one PHP page that would be able to create the whole page from the same few variables - and it would be flexible in what it creates - there would be check-boxes to create the Infobox and/or Stats box and/or Profitability with 3 Totems etc stats box, etc. Tricky stuff will be to handle monuments etc on the same PHP, or create a monuments.php page...? Yet I'm still 50/50 about dedicating to going the PHP route, or to come back to working on my Template:NewStructure which would do the same thing. *Any changes to any values - eg: purchase cost changes, XP collection changes, can just change that single value in the template parameter on the page and every cell on every table on that page will all update instantly. *It is standard across wikia to use templates to standardise content pages (but none other has such extensive complex math and formulas across dozens or hundreds of cells) *Exceedingly complex to program up *No variables within templates - workaround is to call more templates as variables *Any changes to layout, formula, etc will be complex *Difficult for a novice contributor to see what's going on *Extremely flexible in coding *Extremely flexible in input options *Extremely flexible in output options *Coding is relatively simple *Maybe in the future it could be scripted to extract the data from either copying and pasting the whole dict data from the plist file and the PHP would extract all the data in one go. *Maybe even further in the future a php script could read the whole file, listing each structure for you to select from. Complexity being there is a lot of other data to deal with. *Sometime in the future it could be made to deal with structures costing Resources? *Contributors wanting to use the script have to trust a non-wiki website *If an update changed a value, such as purchase cost, a contributor will need to go back the PHP and re-enter all half-dozen or so values, select the appropriate options, and copy and paste replacing the whole page. Sorry for taking so long to answer, I wasn't visiting the page for personal reasons and because I almost don't play the game anymore (almost level 43 so there is no incentive). I think you should use the PHP route and I would keep the use the templates here at minimum possible, because they can be a huge problem if someone else tries to update the data. You should remember that the idea of a wiki is that anyone should be to contribute, so we should make that as simple as we can. Also extensive use of templates would make the structure very hard to change in the future and note that each person (ezcry, me and you) that made extensive contributions to the calculations had a different view, used different calculations and structures. Let me know if I can be of any help. Tdt30 21:53, July 11, 2012 (UTC)